#include <iostream>
using namespace std;
int main()
{
	int arr[9] = { 9,8,7,6,5,4,3,2,1 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (int i = 1; i < sz; i++)
	{
		int j = i - 1;
		int target = arr[i];
		while (j > -1 && target < arr[j])
		{
			arr[j + 1] = arr[j];
			j--;
		}
		arr[j + 1] = target;
	}
	return 0;
}